<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>兴趣交友 - 高级筛选</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #3b82f6;
            --primary-light: #93c5fd;
            --primary-dark: #1d4ed8;
            --secondary: #10b981;
            --accent: #f97316;
            --danger: #ef4444;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --bg-light: #f3f4f6;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 12px;
            --shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 55px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 55px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
            box-shadow: var(--shadow);
        }
        
        .nav-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--primary-dark);
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 搜索栏 */
        .search-container {
            padding: 12px 15px;
            background-color: var(--bg-white);
        }
        
        .search-group {
            position: relative;
        }
        
        .search-input {
            width: 100%;
            padding: 12px 15px 12px 45px;
            border-radius: 30px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            font-size: 0.9rem;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }
        
        /* 快捷筛选栏 */
        .quick-filters {
            display: flex;
            padding: 8px 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            overflow-x: auto;
            scrollbar-width: none;
            gap: 8px;
        }
        
        .quick-filters::-webkit-scrollbar {
            display: none;
        }
        
        .quick-filter-btn {
            white-space: nowrap;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.85rem;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .quick-filter-btn.active {
            background-color: var(--primary);
            color: white;
        }
        
        /* 筛选面板 */
        .filter-panel {
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        
        .filter-panel.collapsed {
            max-height: 0;
        }
        
        .filter-panel.expanded {
            max-height: 1000px;
        }
        
        .filter-header {
            padding: 12px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-light);
            cursor: pointer;
        }
        
        .filter-title {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .filter-icon {
            color: var(--primary);
        }
        
        .filter-toggle-icon {
            color: var(--text-secondary);
            transition: transform 0.3s ease;
        }
        
        .filter-panel.expanded .filter-toggle-icon {
            transform: rotate(180deg);
        }
        
        .filter-content {
            padding: 15px;
        }
        
        /* 多选框组 */
        .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 10px;
        }
        
        .custom-checkbox {
            display: none;
        }
        
        .checkbox-label {
            display: inline-block;
            padding: 6px 14px;
            background-color: var(--bg-light);
            border-radius: 20px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .custom-checkbox:checked + .checkbox-label {
            background-color: var(--primary);
            color: white;
        }
        
        /* 滑块筛选 */
        .range-slider {
            width: 100%;
            margin: 20px 0;
        }
        
        .range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }
        
        .slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: var(--bg-light);
            outline: none;
        }
        
        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
        }
        
        /* 日期选择器 */
        .date-picker {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        
        /* 筛选操作栏 */
        .filter-actions {
            display: flex;
            padding: 12px 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            justify-content: space-between;
            position: sticky;
            bottom: 65px;
            z-index: 900;
        }
        
        .reset-btn {
            padding: 10px 20px;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        .apply-btn {
            padding: 10px 20px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        /* 活跃筛选标签 */
        .active-filters {
            padding: 10px 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }
        
        .active-filter-tag {
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .remove-filter {
            background: none;
            border: none;
            color: var(--primary);
            cursor: pointer;
            font-size: 0.9rem;
        }
        
        .clear-all {
            color: var(--text-secondary);
            font-size: 0.8rem;
            margin-left: auto;
            background: none;
            border: none;
        }
        
        /* 交友列表 */
        .friends-list {
            padding: 0 15px;
        }
        
        .filter-results {
            padding: 12px 15px;
            font-size: 0.9rem;
            color: var(--text-secondary);
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
        }
        
        .friend-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            margin-top: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.2s ease;
        }
        
        .friend-card:hover {
            transform: translateY(-2px);
        }
        
        .card-header {
            padding: 15px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .avatar-container {
            position: relative;
        }
        
        .user-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--bg-white);
        }
        
        .online-status {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: var(--secondary);
            border: 2px solid var(--bg-white);
        }
        
        .offline-status {
            background-color: var(--text-light);
        }
        
        .user-info {
            flex: 1;
        }
        
        .user-name {
            font-size: 1.05rem;
            font-weight: 600;
            margin-bottom: 3px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .user-age {
            color: var(--text-secondary);
            font-weight: normal;
            font-size: 0.9rem;
        }
        
        .user-location {
            font-size: 0.8rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .user-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 5px;
        }
        
        .user-tag {
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        /* 媒体内容样式 */
        .media-container {
            width: 100%;
            position: relative;
        }
        
        .media-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .multi-media {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 2px;
            height: 180px;
        }
        
        .multi-media img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .media-count {
            position: absolute;
            right: 8px;
            bottom: 8px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        /* 无图样式 */
        .friend-card.no-media .card-body {
            padding: 15px;
        }
        
        /* 单图样式 */
        .friend-card.single-media .media-container {
            height: 200px;
        }
        
        /* 个人简介 */
        .card-body {
            padding: 0;
        }
        
        .user-bio {
            padding: 15px;
            font-size: 0.9rem;
            line-height: 1.5;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-light);
        }
        
        .bio-highlight {
            color: var(--primary);
            font-weight: 500;
        }
        
        /* 共同兴趣 */
        .common-interests {
            padding: 12px 15px;
            background-color: var(--bg-light);
            font-size: 0.85rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .interests-list {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }
        
        .interest-tag {
            background-color: white;
            color: var(--text-primary);
            font-size: 0.8rem;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        /* 操作按钮 */
        .action-buttons {
            display: flex;
            gap: 10px;
            padding: 12px 15px;
        }
        
        .primary-btn {
            flex: 1;
            padding: 10px 0;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .primary-btn:hover {
            background-color: var(--primary-dark);
        }
        
        .secondary-btn {
            flex: 1;
            padding: 10px 0;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        /* 加载更多 */
        .load-more {
            width: 100%;
            padding: 12px;
            margin: 15px 0;
            background-color: var(--bg-white);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            color: var(--text-secondary);
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 65px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            text-decoration: none;
        }
        
        .nav-item i {
            font-size: 1.3rem;
            margin-bottom: 3px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        /* 提示消息 */
        .toast-notification {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.9rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast-notification.show {
            opacity: 1;
        }
        
        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-secondary);
        }
        
        .empty-icon {
            font-size: 3rem;
            margin-bottom: 15px;
            color: var(--text-light);
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">兴趣交友</div>
        <button class="nav-action" id="filterPanelToggle">
            <i class="fas fa-sliders-h"></i>
        </button>
    </div>
    
    <!-- 搜索栏 -->
    <div class="search-container">
        <div class="search-group">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索兴趣、用户名、标签...">
        </div>
    </div>
    
    <!-- 快捷筛选 -->
    <div class="quick-filters">
        <button class="quick-filter-btn active">
            <i class="fas fa-th"></i> 全部
        </button>
        <button class="quick-filter-btn">
            <i class="fas fa-star"></i> 推荐
        </button>
        <button class="quick-filter-btn">
            <i class="fas fa-clock"></i> 最新
        </button>
        <button class="quick-filter-btn">
            <i class="fas fa-comment"></i> 活跃
        </button>
        <button class="quick-filter-btn">
            <i class="fas fa-map-marker-alt"></i> 附近
        </button>
        <button class="quick-filter-btn">
            <i class="fas fa-heart"></i> 高匹配
        </button>
    </div>
    
    <!-- 筛选面板 -->
    <div class="filter-panels">
        <!-- 兴趣分类筛选 -->
        <div class="filter-panel expanded">
            <div class="filter-header" onclick="toggleFilterPanel(this.parentElement)">
                <div class="filter-title">
                    <i class="fas fa-tags filter-icon"></i>
                    兴趣分类
                </div>
                <i class="fas fa-chevron-down filter-toggle-icon"></i>
            </div>
            <div class="filter-content">
                <div class="checkbox-group">
                    <input type="checkbox" id="interest1" class="custom-checkbox">
                    <label for="interest1" class="checkbox-label">音乐</label>
                    
                    <input type="checkbox" id="interest2" class="custom-checkbox">
                    <label for="interest2" class="checkbox-label">阅读</label>
                    
                    <input type="checkbox" id="interest3" class="custom-checkbox">
                    <label for="interest3" class="checkbox-label">电影</label>
                    
                    <input type="checkbox" id="interest4" class="custom-checkbox">
                    <label for="interest4" class="checkbox-label">游戏</label>
                    
                    <input type="checkbox" id="interest5" class="custom-checkbox">
                    <label for="interest5" class="checkbox-label">户外</label>
                    
                    <input type="checkbox" id="interest6" class="custom-checkbox">
                    <label for="interest6" class="checkbox-label">美食</label>
                    
                    <input type="checkbox" id="interest7" class="custom-checkbox">
                    <label for="interest7" class="checkbox-label">摄影</label>
                    
                    <input type="checkbox" id="interest8" class="custom-checkbox">
                    <label for="interest8" class="checkbox-label">健身</label>
                    
                    <input type="checkbox" id="interest9" class="custom-checkbox">
                    <label for="interest9" class="checkbox-label">旅行</label>
                    
                    <input type="checkbox" id="interest10" class="custom-checkbox">
                    <label for="interest10" class="checkbox-label">艺术</label>
                </div>
            </div>
        </div>
        
        <!-- 基本信息筛选 -->
        <div class="filter-panel expanded">
            <div class="filter-header" onclick="toggleFilterPanel(this.parentElement)">
                <div class="filter-title">
                    <i class="fas fa-user filter-icon"></i>
                    基本信息
                </div>
                <i class="fas fa-chevron-down filter-toggle-icon"></i>
            </div>
            <div class="filter-content">
                <div class="checkbox-group">
                    <input type="checkbox" id="gender1" class="custom-checkbox">
                    <label for="gender1" class="checkbox-label">男</label>
                    
                    <input type="checkbox" id="gender2" class="custom-checkbox">
                    <label for="gender2" class="checkbox-label">女</label>
                    
                    <input type="checkbox" id="gender3" class="custom-checkbox">
                    <label for="gender3" class="checkbox-label">其他</label>
                </div>
                
                <div class="range-slider">
                    <div class="range-labels">
                        <span>18岁</span>
                        <span id="ageValue">30岁</span>
                        <span>60岁</span>
                    </div>
                    <input type="range" min="18" max="60" value="30" class="slider" id="ageSlider">
                </div>
                
                <div class="checkbox-group">
                    <input type="checkbox" id="verify1" class="custom-checkbox">
                    <label for="verify1" class="checkbox-label">已认证</label>
                    
                    <input type="checkbox" id="verify2" class="custom-checkbox">
                    <label for="verify2" class="checkbox-label">有头像</label>
                </div>
            </div>
        </div>
        
        <!-- 位置筛选 -->
        <div class="filter-panel expanded">
            <div class="filter-header" onclick="toggleFilterPanel(this.parentElement)">
                <div class="filter-title">
                    <i class="fas fa-map-marker-alt filter-icon"></i>
                    位置距离
                </div>
                <i class="fas fa-chevron-down filter-toggle-icon"></i>
            </div>
            <div class="filter-content">
                <div class="checkbox-group">
                    <input type="checkbox" id="distance1" class="custom-checkbox">
                    <label for="distance1" class="checkbox-label">1公里内</label>
                    
                    <input type="checkbox" id="distance2" class="custom-checkbox">
                    <label for="distance2" class="checkbox-label">5公里内</label>
                    
                    <input type="checkbox" id="distance3" class="custom-checkbox" checked>
                    <label for="distance3" class="checkbox-label">10公里内</label>
                    
                    <input type="checkbox" id="distance4" class="custom-checkbox">
                    <label for="distance4" class="checkbox-label">50公里内</label>
                    
                    <input type="checkbox" id="distance5" class="custom-checkbox">
                    <label for="distance5" class="checkbox-label">不限</label>
                </div>
                
                <div class="form-group mt-3">
                    <label class="filter-label">城市</label>
                    <select class="filter-select form-select">
                        <option value="current">当前城市</option>
                        <option value="beijing">北京</option>
                        <option value="shanghai">上海</option>
                        <option value="guangzhou">广州</option>
                        <option value="shenzhen">深圳</option>
                        <option value="hangzhou">杭州</option>
                    </select>
                </div>
            </div>
        </div>
        
        <!-- 活跃度筛选 -->
        <div class="filter-panel expanded">
            <div class="filter-header" onclick="toggleFilterPanel(this.parentElement)">
                <div class="filter-title">
                    <i class="fas fa-bolt filter-icon"></i>
                    活跃度
                </div>
                <i class="fas fa-chevron-down filter-toggle-icon"></i>
            </div>
            <div class="filter-content">
                <div class="checkbox-group">
                    <input type="checkbox" id="active1" class="custom-checkbox" checked>
                    <label for="active1" class="checkbox-label">在线</label>
                    
                    <input type="checkbox" id="active2" class="custom-checkbox">
                    <label for="active2" class="checkbox-label">今日活跃</label>
                    
                    <input type="checkbox" id="active3" class="custom-checkbox">
                    <label for="active3" class="checkbox-label">本周活跃</label>
                    
                    <input type="checkbox" id="active4" class="custom-checkbox">
                    <label for="active4" class="checkbox-label">本月活跃</label>
                </div>
                
                <div class="form-group mt-3">
                    <label class="filter-label">最后登录时间</label>
                    <input type="date" class="date-picker">
                </div>
            </div>
        </div>
        
        <!-- 内容筛选 -->
        <div class="filter-panel expanded">
            <div class="filter-header" onclick="toggleFilterPanel(this.parentElement)">
                <div class="filter-title">
                    <i class="fas fa-image filter-icon"></i>
                    内容筛选
                </div>
                <i class="fas fa-chevron-down filter-toggle-icon"></i>
            </div>
            <div class="filter-content">
                <div class="checkbox-group">
                    <input type="checkbox" id="content1" class="custom-checkbox" checked>
                    <label for="content1" class="checkbox-label">有照片</label>
                    
                    <input type="checkbox" id="content2" class="custom-checkbox">
                    <label for="content2" class="checkbox-label">有多张照片</label>
                    
                    <input type="checkbox" id="content3" class="custom-checkbox">
                    <label for="content3" class="checkbox-label">有个人简介</label>
                    
                    <input type="checkbox" id="content4" class="custom-checkbox">
                    <label for="content4" class="checkbox-label">有兴趣标签</label>
                </div>
                
                <div class="range-slider mt-4">
                    <div class="range-labels">
                        <span>0%</span>
                        <span id="matchValue">50%</span>
                        <span>100%</span>
                    </div>
                    <input type="range" min="0" max="100" value="50" class="slider" id="matchSlider">
                    <div class="form-text text-center mt-2 text-sm text-secondary">最低兴趣匹配度</div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 筛选操作栏 -->
    <div class="filter-actions">
        <button class="reset-btn" id="resetFilters">重置筛选</button>
        <button class="apply-btn" id="applyFilters">应用筛选</button>
    </div>
    
    <!-- 活跃筛选标签 -->
    <div class="active-filters" id="activeFilters">
        <div class="active-filter-tag">
            10公里内
            <button class="remove-filter"><i class="fas fa-times"></i></button>
        </div>
        <div class="active-filter-tag">
            在线
            <button class="remove-filter"><i class="fas fa-times"></i></button>
        </div>
        <div class="active-filter-tag">
            有照片
            <button class="remove-filter"><i class="fas fa-times"></i></button>
        </div>
        <div class="active-filter-tag">
            最低匹配度 50%
            <button class="remove-filter"><i class="fas fa-times"></i></button>
        </div>
        <button class="clear-all">清除全部</button>
    </div>
    
    <!-- 筛选结果统计 -->
    <div class="filter-results">
        找到 <span class="text-primary fw-medium">28</span> 位符合条件的用户
    </div>
    
    <!-- 交友列表 -->
    <div class="friends-list" id="friendsList">
        <!-- 多图样式 -->
        <div class="friend-card multi-media-card">
            <div class="card-header">
                <div class="avatar-container">
                    <img src="https://picsum.photos/id/64/200/200" alt="用户头像" class="user-avatar">
                    <div class="online-status"></div>
                </div>
                <div class="user-info">
                    <div class="user-name">
                        音乐旅人 <span class="user-age">(28)</span>
                    </div>
                    <div class="user-location">
                        <i class="fas fa-map-marker-alt"></i> 5.2公里
                    </div>
                    <div class="user-tags">
                        <span class="user-tag">独立音乐</span>
                        <span class="user-tag">旅行</span>
                        <span class="user-tag">摄影</span>
                    </div>
                </div>
            </div>
            
            <div class="media-container">
                <div class="multi-media">
                    <img src="https://picsum.photos/id/1068/300/300" alt="用户分享图片1">
                    <img src="https://picsum.photos/id/1059/300/300" alt="用户分享图片2">
                    <img src="https://picsum.photos/id/1073/300/300" alt="用户分享图片3">
                </div>
                <div class="media-count">+5</div>
            </div>
            
            <div class="user-bio">
                热爱独立音乐和城市探索，周末常去livehouse和咖啡馆。最近在学习吉他，希望找到能一起交流音乐的朋友 <span class="bio-highlight">#寻找音乐搭子#</span>
            </div>
            
            <div class="common-interests">
                <i class="fas fa-heart text-primary"></i>
                <div class="interests-list">
                    <span class="interest-tag">独立音乐</span>
                    <span class="interest-tag">摄影</span>
                    <span class="interest-tag">咖啡馆探店</span>
                </div>
                <span>3个共同兴趣 (匹配度85%)</span>
            </div>
            
            <div class="action-buttons">
                <button class="secondary-btn dislike-btn">
                    <i class="fas fa-times"></i> 不感兴趣
                </button>
                <button class="primary-btn connect-btn">
                    <i class="fas fa-comment"></i> 打招呼
                </button>
            </div>
        </div>
        
        <!-- 无图样式 -->
        <div class="friend-card no-media">
            <div class="card-header">
                <div class="avatar-container">
                    <img src="https://picsum.photos/id/91/200/200" alt="用户头像" class="user-avatar">
                    <div class="online-status offline-status"></div>
                </div>
                <div class="user-info">
                    <div class="user-name">
                        书虫一枚 <span class="user-age">(32)</span>
                    </div>
                    <div class="user-location">
                        <i class="fas fa-map-marker-alt"></i> 8.7公里
                    </div>
                    <div class="user-tags">
                        <span class="user-tag">文学</span>
                        <span class="user-tag">诗歌</span>
                        <span class="user-tag">读书会</span>
                    </div>
                </div>
            </div>
            
            <div class="card-body">
                <div class="user-bio">
                    文学编辑，每周组织线上读书会，偏爱现当代诗歌和散文。希望认识同样喜欢文字的朋友，一起交流阅读心得 <span class="bio-highlight">#文字爱好者#</span>
                </div>
                
                <div class="common-interests">
                    <i class="fas fa-heart text-primary"></i>
                    <div class="interests-list">
                        <span class="interest-tag">读书会</span>
                        <span class="interest-tag">散文</span>
                    </div>
                    <span>2个共同兴趣 (匹配度72%)</span>
                </div>
            </div>
            
            <div class="action-buttons">
                <button class="secondary-btn dislike-btn">
                    <i class="fas fa-times"></i> 不感兴趣
                </button>
                <button class="primary-btn connect-btn">
                    <i class="fas fa-comment"></i> 打招呼
                </button>
            </div>
        </div>
        
        <!-- 单图样式 -->
        <div class="friend-card single-media">
            <div class="card-header">
                <div class="avatar-container">
                    <img src="https://picsum.photos/id/26/200/200" alt="用户头像" class="user-avatar">
                    <div class="online-status"></div>
                </div>
                <div class="user-info">
                    <div class="user-name">
                        户外探险家 <span class="user-age">(30)</span>
                    </div>
                    <div class="user-location">
                        <i class="fas fa-map-marker-alt"></i> 3.5公里
                    </div>
                    <div class="user-tags">
                        <span class="user-tag">徒步</span>
                        <span class="user-tag">露营</span>
                        <span class="user-tag">摄影</span>
                    </div>
                </div>
            </div>
            
            <div class="media-container">
                <img src="https://picsum.photos/id/29/800/400" alt="用户分享图片" class="media-image">
            </div>
            
            <div class="user-bio">
                户外摄影师，每月至少一次露营或徒步旅行。最近在探索周边的小众路线，寻找有共同爱好的伙伴一起出行 <span class="bio-highlight">#户外爱好者#</span>
            </div>
            
            <div class="common-interests">
                <i class="fas fa-heart text-primary"></i>
                <div class="interests-list">
                    <span class="interest-tag">摄影</span>
                </div>
                <span>1个共同兴趣 (匹配度65%)</span>
            </div>
            
            <div class="action-buttons">
                <button class="secondary-btn dislike-btn">
                    <i class="fas fa-times"></i> 不感兴趣
                </button>
                <button class="primary-btn connect-btn">
                    <i class="fas fa-comment"></i> 打招呼
                </button>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <button class="load-more" id="loadMore">
            <i class="fas fa-spinner fa-spin"></i>
            <span>加载更多朋友</span>
        </button>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-users"></i>
            <span>交友</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-compass"></i>
            <span>发现</span>
        </a>
        <a href="#" class="nav-item">
            <i class="far fa-user"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 筛选面板展开/折叠切换
        function toggleFilterPanel(panel) {
            panel.classList.toggle('expanded');
            panel.classList.toggle('collapsed');
        }
        
        // 全部筛选面板展开/折叠
        const filterPanelToggle = document.getElementById('filterPanelToggle');
        let allPanelsExpanded = true;
        
        filterPanelToggle.addEventListener('click', () => {
            const panels = document.querySelectorAll('.filter-panel');
            
            if (allPanelsExpanded) {
                panels.forEach(panel => {
                    panel.classList.remove('expanded');
                    panel.classList.add('collapsed');
                });
                showToast('已折叠所有筛选面板');
            } else {
                panels.forEach(panel => {
                    panel.classList.remove('collapsed');
                    panel.classList.add('expanded');
                });
                showToast('已展开所有筛选面板');
            }
            
            allPanelsExpanded = !allPanelsExpanded;
        });
        
        // 年龄滑块
        const ageSlider = document.getElementById('ageSlider');
        const ageValue = document.getElementById('ageValue');
        
        ageSlider.addEventListener('input', () => {
            ageValue.textContent = `${ageSlider.value}岁`;
        });
        
        // 匹配度滑块
        const matchSlider = document.getElementById('matchSlider');
        const matchValue = document.getElementById('matchValue');
        
        matchSlider.addEventListener('input', () => {
            matchValue.textContent = `${matchSlider.value}%`;
        });
        
        // 快捷筛选按钮
        const quickFilterBtns = document.querySelectorAll('.quick-filter-btn');
        quickFilterBtns.forEach(btn => {
            btn.addEventListener('click', () => {
                quickFilterBtns.forEach(b => b.classList.remove('active'));
                btn.classList.add('active');
                
                // 模拟快捷筛选
                const filterName = btn.textContent.trim();
                applyQuickFilter(filterName);
            });
        });
        
        // 应用快捷筛选
        function applyQuickFilter(filterName) {
            // 显示加载状态
            const friendsList = document.getElementById('friendsList');
            const originalContent = friendsList.innerHTML;
            friendsList.innerHTML = `
                <div class="d-flex justify-content-center p-5">
                    <div class="spinner-border text-primary" role="status">
                        <span class="visually-hidden">Loading...</span>
                    </div>
                </div>
            `;
            
            // 模拟筛选延迟
            setTimeout(() => {
                friendsList.innerHTML = originalContent;
                showToast(`已应用 "${filterName}" 筛选`);
            }, 800);
        }
        
        // 应用筛选
        document.getElementById('applyFilters').addEventListener('click', () => {
            applyFilters();
        });
        
        // 重置筛选
        document.getElementById('resetFilters').addEventListener('click', () => {
            // 重置所有复选框
            document.querySelectorAll('.custom-checkbox').forEach(checkbox => {
                checkbox.checked = false;
            });
            
            // 重置滑块
            ageSlider.value = 30;
            ageValue.textContent = '30岁';
            matchSlider.value = 50;
            matchValue.textContent = '50%';
            
            // 重置快捷筛选
            quickFilterBtns.forEach(b => b.classList.remove('active'));
            quickFilterBtns[0].classList.add('active');
            
            // 清空活跃筛选标签
            document.getElementById('activeFilters').innerHTML = `
                <button class="clear-all">清除全部</button>
            `;
            
            // 重新绑定事件
            bindFilterEvents();
            
            showToast('已重置所有筛选条件');
            
            // 应用重置后的筛选
            applyFilters();
        });
        
        // 清除单个筛选条件
        function bindFilterEvents() {
            document.querySelectorAll('.remove-filter').forEach(btn => {
                btn.addEventListener('click', (e) => {
                    e.stopPropagation();
                    const tag = btn.closest('.active-filter-tag');
                    const filterText = tag.textContent.trim();
                    tag.remove();
                    
                    // 根据标签文本移除对应的筛选条件
                    removeFilterByText(filterText);
                    
                    showToast(`已移除筛选: ${filterText}`);
                    
                    // 如果没有筛选条件了，隐藏活跃筛选栏
                    if (document.querySelectorAll('.active-filter-tag').length === 0) {
                        document.getElementById('activeFilters').style.display = 'none';
                    } else {
                        document.getElementById('activeFilters').style.display = 'flex';
                    }
                    
                    // 重新应用筛选
                    applyFilters();
                });
            });
            
            // 清除全部筛选条件
            document.querySelector('.clear-all').addEventListener('click', () => {
                document.getElementById('resetFilters').click();
            });
        }
        
        // 根据文本移除筛选条件
        function removeFilterByText(filterText) {
            // 这里根据实际筛选条件文本，移除对应的筛选状态
            if (filterText.includes('公里内')) {
                document.querySelectorAll('[id^="distance"]').forEach(checkbox => {
                    checkbox.checked = false;
                });
            } else if (filterText.includes('在线')) {
                document.getElementById('active1').checked = false;
            } else if (filterText.includes('有照片')) {
                document.getElementById('content1').checked = false;
            } else if (filterText.includes('匹配度')) {
                matchSlider.value = 0;
                matchValue.textContent = '0%';
            }
        }
        
        // 应用筛选条件
        function applyFilters() {
            // 收集所有筛选条件
            const selectedInterests = [];
            document.querySelectorAll('#interest1:checked, #interest2:checked, #interest3:checked, #interest4:checked, #interest5:checked, #interest6:checked, #interest7:checked, #interest8:checked, #interest9:checked, #interest10:checked').forEach(checkbox => {
                selectedInterests.push(checkbox.nextElementSibling.textContent);
            });
            
            const selectedGenders = [];
            document.querySelectorAll('#gender1:checked, #gender2:checked, #gender3:checked').forEach(checkbox => {
                selectedGenders.push(checkbox.nextElementSibling.textContent);
            });
            
            const selectedDistances = [];
            document.querySelectorAll('[id^="distance"]:checked').forEach(checkbox => {
                selectedDistances.push(checkbox.nextElementSibling.textContent);
            });
            
            const selectedActive = [];
            document.querySelectorAll('#active1:checked, #active2:checked, #active3:checked, #active4:checked').forEach(checkbox => {
                selectedActive.push(checkbox.nextElementSibling.textContent);
            });
            
            const selectedContent = [];
            document.querySelectorAll('[id^="content"]:checked').forEach(checkbox => {
                selectedContent.push(checkbox.nextElementSibling.textContent);
            });
            
            const ageValue = document.getElementById('ageSlider').value;
            const matchValue = document.getElementById('matchSlider').value;
            
            // 显示加载状态
            const friendsList = document.getElementById('friendsList');
            const originalContent = friendsList.innerHTML;
            friendsList.innerHTML = `
                <div class="d-flex justify-content-center p-5">
                    <div class="spinner-border text-primary" role="status">
                        <span class="visually-hidden">Loading...</span>
                    </div>
                </div>
            `;
            
            // 模拟筛选延迟
            setTimeout(() => {
                // 恢复列表内容
                friendsList.innerHTML = originalContent;
                
                // 更新活跃筛选标签
                updateActiveFilters(selectedInterests, selectedGenders, selectedDistances, selectedActive, selectedContent, ageValue, matchValue);
                
                // 更新结果统计
                const resultCount = Math.floor(Math.random() * 30) + 5;
                document.querySelector('.filter-results').innerHTML = 
                    `找到 <span class="text-primary fw-medium">${resultCount}</span> 位符合条件的用户`;
                
                showToast('筛选已应用');
            }, 1000);
        }
        
        // 更新活跃筛选标签
        function updateActiveFilters(interests, genders, distances, active, content, age, match) {
            let activeFiltersHTML = '';
            
            // 添加兴趣筛选标签
            interests.forEach(interest => {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        ${interest}
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            });
            
            // 添加性别筛选标签
            genders.forEach(gender => {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        ${gender}
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            });
            
            // 添加距离筛选标签
            distances.forEach(distance => {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        ${distance}
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            });
            
            // 添加活跃度筛选标签
            active.forEach(active => {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        ${active}
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            });
            
            // 添加内容筛选标签
            content.forEach(content => {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        ${content}
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            });
            
            // 添加年龄筛选标签（如果不是默认值）
            if (age !== '30') {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        年龄 ${age}岁
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            }
            
            // 添加匹配度筛选标签（如果不是默认值）
            if (match !== '0') {
                activeFiltersHTML += `
                    <div class="active-filter-tag">
                        最低匹配度 ${match}%
                        <button class="remove-filter"><i class="fas fa-times"></i></button>
                    </div>
                `;
            }
            
            // 添加清除全部按钮
            activeFiltersHTML += `<button class="clear-all">清除全部</button>`;
            
            // 更新活跃筛选标签容器
            document.getElementById('activeFilters').innerHTML = activeFiltersHTML;
            
            // 重新绑定筛选标签事件
            bindFilterEvents();
            
            // 显示或隐藏活跃筛选栏
            if (activeFiltersHTML !== '<button class="clear-all">清除全部</button>') {
                document.getElementById('activeFilters').style.display = 'flex';
            } else {
                document.getElementById('activeFilters').style.display = 'none';
            }
        }
        
        // 绑定交友列表交互事件
        function bindFriendEvents() {
            // 打招呼按钮
            const connectButtons = document.querySelectorAll('.connect-btn:not([data-bound])');
            connectButtons.forEach(btn => {
                btn.setAttribute('data-bound', 'true');
                btn.addEventListener('click', () => {
                    const userName = btn.closest('.friend-card').querySelector('.user-name').textContent.split(' ')[0];
                    showToast(`已向 ${userName} 发送招呼`);
                    
                    // 更改按钮状态
                    btn.innerHTML = '<i class="fas fa-check"></i> 已发送';
                    btn.disabled = true;
                    btn.style.backgroundColor = 'var(--secondary)';
                });
            });
            
            // 不感兴趣按钮
            const dislikeButtons = document.querySelectorAll('.dislike-btn:not([data-bound])');
            dislikeButtons.forEach(btn => {
                btn.setAttribute('data-bound', 'true');
                btn.addEventListener('click', () => {
                    const card = btn.closest('.friend-card');
                    const userName = card.querySelector('.user-name').textContent.split(' ')[0];
                    
                    // 添加淡出动画
                    card.style.transition = 'opacity 0.3s ease, transform 0.3s ease';
                    card.style.opacity = '0';
                    card.style.transform = 'translateX(-20px)';
                    
                    setTimeout(() => {
                        card.remove();
                        showToast(`已隐藏 ${userName}`);
                    }, 300);
                });
            });
            
            // 加载更多
            document.getElementById('loadMore').addEventListener('click', function() {
                const btn = this;
                const originalText = btn.innerHTML;
                btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i><span>加载中...</span>';
                btn.disabled = true;
                
                // 模拟加载延迟
                setTimeout(() => {
                    btn.innerHTML = originalText;
                    btn.disabled = false;
                    showToast('已加载更多朋友');
                    
                    // 复制第一个朋友卡片并修改内容
                    const friendsList = document.getElementById('friendsList');
                    const firstCard = friendsList.querySelector('.friend-card:first-of-type');
                    
                    if (firstCard) {
                        const clone = firstCard.cloneNode(true);
                        // 修改一些内容以示区别
                        const randomId = Math.floor(Math.random() * 100) + 200;
                        clone.querySelector('.user-avatar').src = `https://picsum.photos/id/${randomId}/200/200`;
                        
                        // 随机更改在线状态
                        const statusElem = clone.querySelector('.online-status');
                        if (Math.random() > 0.5) {
                            statusElem.classList.remove('offline-status');
                        } else {
                            statusElem.classList.add('offline-status');
                        }
                        
                        // 插入到加载更多按钮前
                        friendsList.insertBefore(clone, btn);
                        
                        // 重新绑定事件
                        bindFriendEvents();
                    }
                }, 1500);
            });
        }
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', () => {
            showToast('返回上一页');
        });
        
        // 提示消息
        function showToast(message) {
            // 检查是否已有toast
            let toast = document.querySelector('.toast-notification');
            if (toast) {
                toast.remove();
            }
            
            // 创建新toast
            toast = document.createElement('div');
            toast.className = 'toast-notification';
            toast.textContent = message;
            
            document.body.appendChild(toast);
            
            // 显示toast
            setTimeout(() => {
                toast.classList.add('show');
            }, 10);
            
            // 3秒后隐藏并移除
            setTimeout(() => {
                toast.classList.remove('show');
                setTimeout(() => toast.remove(), 300);
            }, 3000);
        }
        
        // 页面加载完成后初始化
        window.addEventListener('DOMContentLoaded', () => {
            bindFilterEvents();
            bindFriendEvents();
        });
    </script>
</body>
</html>

